package com.iretailer.report.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.iretailer.report.base.SuperMapper;
import com.iretailer.report.model.GenderAge;
import com.iretailer.report.model.GenderAgeImage;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;


/**
 * @Auther: xjw
 * @Date: 2019/8/8 0008 21:23
 * @Description:
 */
public interface GenderAgeMapper extends SuperMapper<GenderAge> {

    int replace(@Param("genderAges") List<GenderAge> genderAges);

    IPage<GenderAgeImage> faceImageGrid(Page page, @Param("ew") QueryWrapper queryWrapper);

    List<GenderAgeImage> selectGroupByGender(@Param("ew") QueryWrapper queryWrapper);

    List<GenderAgeImage> selectGroupByAgeType(@Param("ew") QueryWrapper queryWrapper);

    IPage<GenderAgeImage> lasetFaceImageGrid(Page page, @Param("mallId") String mallId, @Param("startDate") LocalDate startDate, @Param("endDate") LocalDate endDate);
}
